package com.probiz.estore.core.taglib;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

import com.probiz.estore.aop.VerFuncInterceptor;

public class VerFuncDecodeTag extends TagSupport {
	private String funcKey ;
	private String funcValue ;
	private String funcTitle ;
	
	
	public int doStartTag() throws JspException {
		try {
			if(funcKey!=null){
				pageContext.getOut().write(VerFuncInterceptor.getVerFuncKey(funcKey));
			}else if(funcValue!=null){
				pageContext.getOut().write(VerFuncInterceptor.getVerFuncValue(funcValue));
			}else if(funcTitle!=null){
				pageContext.getOut().write(VerFuncInterceptor.getVerFuncTitle(funcTitle));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return Tag.EVAL_PAGE;
	}


	public void setFuncKey(String funcKey) {
		this.funcKey = funcKey;
	}


	public void setFuncValue(String funcValue) {
		this.funcValue = funcValue;
	}


	public void setFuncTitle(String funcTitle) {
		this.funcTitle = funcTitle;
	}
	
	
}
